import requests
import unittest
from ddt import ddt,data,unpack
# 导入封装的excel类
from unit__001.unit_05.excel import excel

path = r'/unit__001/unit_05/data.xlsx'
sheetname = 'Sheet1'
dy = excel(path, sheetname)

@ddt
class A3mall(unittest.TestCase):
    def setUp(self) -> None:
        print('start case')

    def tearDown(self) -> None:
        print('end case')

    # 商品详情页
    @data(*dy.get_data())
    @unpack
    def test_A3mall_04(self,spid):
        print(spid)
        view = requests.get(url=f'http://10.59.9.14:7003/api/group/view?id={spid}')
        print(view.json())


if __name__ == '__main__':
    unittest.main()